import main from '@src/main';
import { LoginUser } from '@src/types';

// 重置密码
export async function apiResetPassword(userId: string, password: string) {
  return main.api.put('/system/user/resetPassword', { userId, password });
}
// 修改个人信息
export async function apiUserUpdateInfo(data: LoginUser) {
  let res = await main.api.put('/system/user/profile', data);
  return res;
}

// 生成支付二维码
export async function apiCreatePay(num: number) {
  return await main.api.get(`/system/dept/balanceRecharge/${num}`);
}
// 查询支付状态
export async function apiQueryPayStatus(id: string | number) {
  return await main.api.get(`/system/payNotifyLog/queryPayState/${id}`);
}
//获取账户余额信息
export async function apiGetDeptBalanceInfo() {
  return await main.api.get(`/system/dept/queryDeptBalance`);
}
